<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>
			Document
		</title>
		<script type='text/javascript' src='http://localhost/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
COMMON = '<?php echo $GLOBALS['user']['COMMON'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
MODULE = '<?php echo $GLOBALS['user']['MODULE'];?>';
CONTROLLER = '<?php echo $GLOBALS['user']['CONTROLLER'];?>';
ACTION = '<?php echo $GLOBALS['user']['ACTION'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
VIEW = '<?php echo $GLOBALS['user']['VIEW'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
CONTROLLERVIEW = '<?php echo $GLOBALS['user']['CONTROLLERVIEW'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
</script>
		<script type="text/javascript" src="http://localhost/llq/ESHOP/Admin/View/Goods/js/js.js"></script>
		<script>
			action='add';
		</script>
	</head>
	<body>
		<form method="post" class="hd-form" enctype="multipart/form-data">
			<div class="wrap">
				<div class="menu_list">
					<ul>
						<li>
							<a href="<?php echo U('index');?>"  class="action">
								商品列表
							</a>
						</li>
					</ul>
				</div>
				<div class="tab">
					<ul class="tab_menu">
						<li lab="base">
							<a>
								基本信息
							</a>
						</li>
						<li lab="content" class="action">
							<a>
								内容
							</a>
						</li>
						<li lab="image" class="action">
							<a>
								图片
							</a>
						</li>
					</ul>
					<div class="tab_content">
						<div id="base">
							<table class="table1">
								
								<tr>
									<th class="w100">
										栏目
									</th>
									<td>
										<select name='cid' onchange="getAttrForm(this)">
											<option value="0">==选择栏目==</option>
											<?php $hd["list"]["cat"]["total"]=0;if(isset($category) && !empty($category)):$_id_cat=0;$_index_cat=0;$lastcat=min(1000,count($category));
$hd["list"]["cat"]["first"]=true;
$hd["list"]["cat"]["last"]=false;
$_total_cat=ceil($lastcat/1);$hd["list"]["cat"]["total"]=$_total_cat;
$_data_cat = array_slice($category,0,$lastcat);
if(count($_data_cat)==0):echo "";
else:
foreach($_data_cat as $key=>$cat):
if(($_id_cat)%1==0):$_id_cat++;else:$_id_cat++;continue;endif;
$hd["list"]["cat"]["index"]=++$_index_cat;
if($_index_cat>=$_total_cat):$hd["list"]["cat"]["last"]=true;endif;?>

											<option value="<?php echo $cat['cid'];?>" <?php if($cat['cattype'] == 1){?>disabled=""<?php }?>><?php echo $cat['_name'];?></option>
											<?php $hd["list"]["cat"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
										</select>
									</td>
								</tr>
								<tr>
									<th class="w100">
										商品名称
									</th>
									<td>
										<input type="text" name='gname' class="w200"/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										价格
									</th>
									<td>
										<input type="text" name='price' class="w200"/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										库存
									</th>
									<td>
										<input type="text" name='stock' class="w200"/>
									</td>
								</tr>
							</table>
							<div id='goodsAttr'>
								
							</div>
						</div>
						<div id="content">
							<table class="table1">
								<tr>
									<th class="w100">
										关键字
									</th>
									<td>
										<input type="text" name='keywords' class="w200"/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										描述
									</th>
									<td>
										<textarea name="description" class="w300 h100"></textarea>										
									</td>
								</tr>
								<tr>
									<th class="w100">
										详细介绍
									</th>
									<td>
										<script type="text/javascript" charset="utf-8" src="http://localhost/hdphp/hdphp/Extend/Org/Ueditor/ueditor.config.js"></script><script type="text/javascript" charset="utf-8" src="http://localhost/hdphp/hdphp/Extend/Org/Ueditor/ueditor.all.min.js"></script><script type="text/javascript">UEDITOR_HOME_URL="http://localhost/hdphp/hdphp/Extend/Org/Ueditor/"</script><script id="hd_content" name="content" type="text/plain"></script>
        <script type='text/javascript'>
        $(function(){
                var ue = UE.getEditor('hd_content',{
                serverUrl:'http://localhost/llq/index.php?m=Admin&c=Goods&a=ueditor_upload&water='//图片上传脚本
                ,zIndex : 1000
                ,initialFrameWidth:"100%" //宽度1000
                ,initialFrameHeight:"300" //宽度1000
                ,imagePath:''//图片修正地址
                ,autoHeightEnabled:false //是否自动长高,默认true
                ,autoFloatEnabled:false //是否保持toolbar的位置不动,默认true
                ,toolbars:[
            ['fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset',
            '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', '|',
            'lineheight', '|','paragraph', 'fontfamily', 'fontsize', '|',
             'indent','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
            'link', 'unlink', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload',  'emotion',   'map',  'insertcode',  'pagebreak','horizontal', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow',  'insertcol',  'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols']
            ]//工具按钮
//                ,enableAutoSave: false//关闭自动保存
                ,initialStyle:'p{line-height:1em; font-size: 14px; }'
            });
        })
        </script>
									</td>
								</tr>
								<tr>
									<th class="w100">
										服务
									</th>
									<td>
										<textarea name="service" class="w300 h100"></textarea>										

									</td>
								</tr>
								<tr>
									<th class="w100">
										查看次数
									</th>
									<td>
										<input type="text" name='click' class="w200" />
									</td>
								</tr>
								<tr>
									<th class="w100">
										上架时间
									</th>
									<td>
										<input type="text" readonly="readonly" id="addtime" name="addtime"
										value="<?php echo date('Y/m/d h:i:s');?>"
										class="w150"/>
										<script>$('#addtime').calendar({
	format: 'yyyy/MM/dd HH:mm:ss'
});</script>
									</td>
								</tr>
							</table>
						</div>
						<div id="image">
							<table class="table1">
								<tr>
									<th class="w100">
										首页图片 
									</th>
									<td>
										<input type="file" name='index_image'/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										列表页图片  
									</th>
									<td>
										<input type="file" name='list_image'/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										详情页产品图
									</th>
									<td>
										<table id="goodsImages">
											<tr>
												<td>
													<input type="file" name='image[]' class="w200"/>
										<button type="button" class="hd-cancel" onclick="addImageInput()">增加</button>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</div>
				<div class="position-bottom">
					<input type="submit" class="hd-success" />
				</div>
			</div>
		</form>
	</body>
</html>
